<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title> new document </title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />

  <style type="text/css">


  </style>

  <script src="./jQuery/v1.12.4/jquery.js"></script>


  <!--   <script src="./myLib/OttorUtil.js"></script> -->
  <!-- <script src="./jQuery/v3.3.1/jquery-3.3.1.js"></script> -->
<!--   <script src="./md5/md5.js"></script> -->


  <!-- 搜索 -->
<!--   <script src="./myLib/OttorUtil.js"></script> -->

<script type="text/javascript">
  
$.fn.jsonObject = function () {
  var array = $(this).serializeArray();
  console.log(array);

  // var obj = {};

  // for (var i = 0; i < array.length; i++) {
  //   if (obj[array[i].name]) {
  //     // obj[array[i].name
  //   } else {}
  // }

  return array;
};

</script>

 </head>

 <body>


<!-- <div id="www" style="width: 300px;height: 300px;background: #ccc;">
  <span id="demo"></span>
</div> -->

<form>
  <select name="single">
    <option>Single</option>
    <option>Single2</option>
  </select>
  <select name="multiple" multiple="multiple">
    <option selected="selected">Multiple</option>
    <option>Multiple2</option>
    <option selected="selected">Multiple3</option>
  </select><br/>
  <input type="checkbox" name="check" value="check1" checked="checked"/> check1
  <input type="checkbox" name="check" value="check2" checked="checked"/> check2
  <input type="radio" name="radio" value="radio1" checked="checked"/> radio1
  <input type="radio" name="radio" value="radio2"/> radio2
</form>





  <script>

  // console.log($("form").serializeArray());
  console.log($("form").jsonObject());
  
	// console.log(Ottor.typeUtil.isObject);
	// var obj = {a:11};
	// console.log(Ottor.typeUtil.isObject(obj));
	// var arr = [1,2,3];
	// console.log(Ottor.typeUtil.isArray(arr));
	// var str = 'asd';
	// console.log(Ottor.typeUtil.isString(str));
  
  // var astr = 'boxboxboxhello box worldboxboxbox';
  // var regstr = 'box';
  // var reg = new RegExp('^('+ regstr +')*.*('+ regstr +')*$');
  // console.log(astr.replace(reg, ''));


  // console.log(hex_md5('123456'));
  // $(function () {

  // });
  </script>
 </body>
</html>
